{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Scatter Matrix\n",
    "--------------\n",
    "An example of using a RepeatChart to construct a multi-panel scatter plot\n",
    "with linked panning and zooming.\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# category: interactive\n",
    "\n",
    "import altair as alt\n",
    "alt.data_transformers.enable('json')\n",
    "from vega_datasets import data\n",
    "\n",
    "alt.Chart(data.cars.url).mark_circle().encode(\n",
    "    alt.X(alt.repeat(\"column\"), type='quantitative'),\n",
    "    alt.Y(alt.repeat(\"row\"), type='quantitative'),\n",
    "    color='Origin:N'\n",
    ").properties(\n",
    "    width=250,\n",
    "    height=250\n",
    ").repeat(\n",
    "    row=['Horsepower', 'Acceleration', 'Miles_per_Gallon'],\n",
    "    column=['Miles_per_Gallon', 'Acceleration', 'Horsepower']\n",
    ").interactive()\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "env": {},
   "interrupt_mode": "signal",
   "language": "python",
   "metadata": {},
   "name": "python3"
  },
  "language": "python"
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
